#!/usr/bin/env python
# coding=utf-8

import os
import logging

# set log
def get_file_log(logFileName):
    logger = logging.getLogger(os.path.abspath(logFileName))
    hdlr = logging.FileHandler(logFileName)
    formatter = logging.Formatter('%(asctime)s %(levelname)s:: %(message)s')
    hdlr.setFormatter(formatter)
    logger.addHandler(hdlr)
    logger.setLevel(logging.INFO)
    return logger
